var status = -1;
var selectionLog = [];

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }
    status++;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (cm.isQuestFinished(17662) && !cm.isQuestFinished(17663)) {
                cm.spawnMobLimit(9390834, 1, 200, 40, 20);
                cm.spawnMobLimit(9390834, 1, 100, 40, 20);
                cm.spawnMobLimit(9390834, 1, 90, 40, 20);
                cm.spawnMobLimit(9390834, 1, -200, 40, 20);
                cm.spawnMobLimit(9390834, 1, -400, 40, 20);
                cm.spawnMobLimit(9390834, 1, -600, 40, 20);
                cm.spawnMobLimit(9390834, 1, -800, 40, 20);
                cm.spawnMobLimit(9390834, 1, -900, 40, 20)
            }
            cm.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};